from django.urls import path
from users.views import RegisterView, SmsCodeView, LoginView, LogoutView,ForgetPasswordView,UserCenterView,WriteBlogView
from users.views import ImageView # 导入验证码视图
urlpatterns = [
    # 参数1：路由
    # 参数2：视图函数
    # 参数3：路由名，方便通过reverse来获取路由
    path('register/', RegisterView.as_view(), name='register'),
    path('imagecode/', ImageView.as_view(), name='imagecode'),
    path('smscode/',SmsCodeView.as_view(),name = 'smscode'),
    path('login/',LoginView.as_view(),name = 'login'),
    path('logout/',LogoutView.as_view(),name = 'logout'),
    path('forgetpassword/', ForgetPasswordView.as_view(),name='forgetpassword'),
    path('usercenter/', UserCenterView.as_view(),name='usercenter'),
    path('writeblog/', WriteBlogView.as_view(),name='writeblog'),
]
